﻿using Shinva.Variables.Interface;
using Shinva.Variables.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;

namespace Shinva.Variables.Type.combination
{
   public class PlcStruct : PlcComplexBase
    {
        ///// <summary>
        ///// 结构体成员列表
        ///// </summary>
        //private readonly List<IPlcMember> _members = new List<IPlcMember>();

        //// 添加获取成员列表的方法
        //public IReadOnlyList<IPlcMember> GetMembers() => _members.AsReadOnly();

        ///// <summary>
        ///// 结构体构造函数
        ///// </summary>
        ///// <param name="name"></param>
        public string CustomName { get; set; } = "undef";

        public PlcStruct(string name ="Struct" ) {
            Name = name;
            DataType = DataType.Struct;
            SizeInBits = 0;
        }
        
        /// <summary>
        /// 自定义结构体构造函数
        /// </summary>
        /// <param name="custom"></param>
        /// <param name="name"></param>
        public PlcStruct(string custom,string name ="Struct") {
            Name = name;
            DataType = DataType.Struct;
            SizeInBits = 0;
            CustomName = custom;
        }

        


    }
}
